package com.liangzhong.modules.techBar.command
{
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.proxy.techBar.TechBarProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 *科技馆 
	 * @author lake
	 * 
	 */	
	public class TechBarCommand extends SimpleCommand
	{
		public function TechBarCommand()
		{
			super();
		}
		override public function execute(notification :INotification):void
		{
			var proxy :TechBarProxy = facade.retrieveProxy(TechBarProxy.ProxyName) as TechBarProxy;
			switch(notification.getName())
			{
				case ApplicationConstants.TECHBAR_GET_INFO://获取信息
				{
					proxy.getInfo(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_GRADE_UP://升级
				{
					proxy.gradeUp();
					break;
				}
				case ApplicationConstants.TECHBAR_EQUIPCOMBINE://装备合成
				{
					proxy.equipCombine(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_MATERIALCOMBINE://材料合成
				{
					proxy.materialCombine(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_PLAYERCOMBINE://球员合成
				{
					proxy.playerCombine(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_CLOTHCOMBINE://球衣合成
				{
					proxy.clothCombine(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_PLAYERREFRESH://球员洗练
				{
					proxy.playerRefresh(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_ROLECHANGE://角色转职
				{
					proxy.roleChange(notification.getBody());
					break;
				}
				case ApplicationConstants.TECHBAR_ROLE_REFRESH://角色洗练
				{
					proxy.roleRefresh(notification.getBody());
					break;
				}
			}
		}
	}
}